﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Visa_infoSupplyForm.aspx.cs" Inherits="FS.Web.BLL.Visa_Base.Visa_infoSupplyForm" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title> 
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/Validator/JValidator.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/artDialog.source.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/artDialog/iframeTools.source.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript">        
        //修改收款方式
        function ChangeMoneyFlag() {
            var moneyflag = $("#Ref_moneyflag").val();
            var moneytype = "month";
            if (moneyflag == "yes") {
                moneytype = "money";
            }

            $("#Ref_moneytype").get(0).value = moneytype;
        }
    </script>       
</head>
<body>    
    <form id="form1" runat="server">
    <input id="Hinfo" type="hidden" runat="server"  />
    <input id="Hpricecode" type="hidden" runat="server"/>         
    <input id="HDetailID" type="hidden" runat="server"/>   
    <table border="0" cellpadding="0" cellspacing="0" class="frm">                
        <tr>
            <th>
                单号：
            </th>
            <td>
                <input id="info_no" runat="server" type="text" disabled="disabled" class="select" datacol="yes" style="width: 140px" />
            </td>                              
            <th>
                 签证状态：</th>                   
            <td>
                <select id="Ref_infoflag" runat="server" disabled="disabled" type="text" class="select" style="width: 146px" />
            </td>
             <th>
                收签时间：
            </th>
            <td>
               <input id="info_getdate" runat="server" type="text" class="txt" disabled="disabled" style="width: 140px"  />
            </td>                   
        </tr>        
        <tr>
            <th>                
                委托方：
            </th>
            <td>
                <select id="trust_id" runat="server" type="text" class="select" style="width: 146px" disabled="disabled" />
            </td>
            <th>
                委托方类型：
            </th>
            <td>
                <input id="Ref_trusttype" runat="server" type="text" class="txt" disabled="disabled" style="width: 140px"  />               
            </td>
             <th>
                 申请人：
            </th>
            <td>
               <input id="info_operation" runat="server" type="text" class="txt"  style="width: 140px"  datacol="yes" err="申请人"
                    checkexpession="NotNull"   />
            </td>
            
        </tr>
        <tr>
            <th>
                联系人：
            </th>
            <td>
                <input id="info_contactuser" runat="server" type="text" class="txt" datacol="yes" err="联系人"
                    checkexpession="NotNull" style="width: 140px" />
            </td>
            <th>
                联系方式：
            </th>
            <td>
               <input id="info_contactnumber" runat="server" type="text" class="txt" datacol="yes" err="联系方式"
                    checkexpession="NotNull" style="width: 140px" />
            </td>
            <th>
                团号：
            </th>
            <td>
               <input id="info_TuanNo" runat="server" type="text" class="txt" style="width: 140px" />
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div id ="detailsub" class="grid" style="height:240px;overflow:auto; ">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True" Width="100%" BackColor="White" BorderColor="#CCCCCC" BorderStyle="Dotted" BorderWidth="1px" CellPadding="3" DataKeyNames="infodetail_id" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDataBound="GridView1_RowDataBound" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" >
                    <Columns>
                        <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" >
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="签证国家">
                            <EditItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("city_name") %>'></asp:Label>
                                <asp:HiddenField ID="Hd_city" runat="server" Value='<%# Eval("city_id")%>' />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("city_name") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="签证类型">
                            <EditItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("property_value") %>'></asp:Label>
                                <asp:HiddenField ID="Hd_certtype" runat="server" Value='<%# Eval("Ref_CertType")%>' />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("property_value") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="InfoDetai_BegPrice" HeaderText="签证费用" ReadOnly="True">
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="客户" SortExpression="infodetail_user">
                            <EditItemTemplate>
                                <asp:TextBox runat="server" ID="txt_infodetail_user" Text='<%# Bind("infodetail_user") %>' Width="100px"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lb_supply" runat="server" Text='<%# Bind("infodetail_user") %>' Width="80px"></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="供应商" SortExpression="Supply_Name">
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddl_supply" runat="server" Width="120px" 
                                    OnSelectedIndexChanged="ddlsupply_SelectedIndexChanged" AutoPostBack="true">
                                </asp:DropDownList>
                                <asp:HiddenField ID="Hd_supply" runat="server" Value='<%# Eval("Supply_id")%>' />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lb_supply" runat="server" Text='<%# Bind("Supply_Name") %>' Width="120px"></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="供应商报价">
                            <EditItemTemplate>
                                <asp:Label ID="lb_sprice" runat="server" Text='<%# Bind("InfoDetai_EndPrice") %>'></asp:Label>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("InfoDetai_EndPrice") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="70px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="infodetail_cardno" HeaderText="护照" ReadOnly="True" >
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="70px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="infodetail_id" HeaderText="infodetail_id" Visible="False" />
                        <asp:CommandField ShowEditButton="True" CancelText="取消" EditText="编辑" UpdateText="更新" >
                        <HeaderStyle Width="80px" />
                        </asp:CommandField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#007DBB" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#00547E" />
                </asp:GridView>
            </div> 
            <div id ="subtotal" class="grid" >
                <table border="0" cellpadding="0" cellspacing="0" class="frm">
                    <tr>            
                        <th>
                            人数：
                        </th>
                        <td>               
                            <input id="info_outpeople" runat="server" type="text" disabled="disabled" class="txt" style="width: 140px" value="0" />
                        </td>
                            <th>
                                签证费用：
                        </th>
                        <td>
                            <input id="info_outmoney" runat="server" type="text" disabled="disabled" class="txt" style="width: 140px" value="0" />
                        </td>
                            <th>
                                供应商费用</th>
                        <td>
                            <input id="info_outprice" runat="server" type="text" disabled="disabled" class="txt" style="width: 140px" value="0" />   
                        </tr>
                    <tr>
                        <th>
                            取件类型：
                        </th>
                        <td>               
                            <select id="Ref_postby" runat="server" type="text" class="select"  style="width: 146px"></select>                 
                            </td>
                            <th>
                            取件费用：
                        </th>
                        <td>
                            <input id="Ref_postmoney" runat="server" type="text" class="txt" datacol="yes" err="取件费用"
                                checkexpession="DoubleOrNull" style="width: 140px" value="0" />
                        </td>
                        <th>
                            收款情况：</th>
                        <td>
                            &nbsp;<select id="Ref_moneyflag" runat="server" class="select" name="D2" onchange="ChangeMoneyFlag()" style="width: 146px" type="text">
                            </select></td>
                    </tr>
                    <tr>
                        <th>
                            发票信息：
                        </th>
                        <td>
                            <input id="Info_fapiao" runat="server" type="text" class="txt" datacol="yes" style="width: 140px" />
                        </td>
                        <th>
                            发票金额：
                        </th>
                        <td>
                            <input id="info_moneyfapiao" runat="server" type="text" class="txt" datacol="yes" err="发票金额"
                                checkexpession="DoubleOrNull" style="width: 140px" value="0" />               
                        </td>
                        <th>
                            收款方式： </th>
                        <td>
                            <select id="Ref_moneytype" runat="server" class="select" name="D1" style="width: 146px; margin-top: 0px;" type="text">
                            </select></td>
                    </tr>
                    <tr>
                        <th>
                            应收<span lang="ZH-CN">费用</span>：
                        </th>
                        <td>
                            <input id="info_moneyin" runat="server" type="text" class="txt" datacol="yes" err="应收金额"
                                checkexpession="DoubleOrNull" style="width: 140px" />
                        </td>
                            <th>
                            应付金额：
                        </th>
                        <td>
                            <input id="info_moneyout" runat="server" type="text" class="txt" datacol="yes" err="应付金额"
                                checkexpession="DoubleOrNull" style="width: 140px" />
                        </td>
                        <th>
                            &nbsp;</th>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <th>
                            备注：
                        </th>
                        <td colspan=5>
                            <textarea id="info_remark" class="txtRemark" runat="server" style="width: 95%;
                                height: 50px;"></textarea>
                        </td>           
                    </tr>
                </table>
            </div>  
        </ContentTemplate>
    </asp:UpdatePanel>         
        
    <div class="frmbottom">
        <asp:LinkButton ID="Save" runat="server" class="l-btn" OnClientClick="return CheckDataValid('#form1');"
            OnClick="Save_Click"><span class="l-btn-left">
            <img src="/Themes/Images/save.png" alt="" />保 存</span></asp:LinkButton>
        <a class="l-btn" href="javascript:void(0)" onclick="OpenClose();"><span class="l-btn-left">
            <img src="/Themes/Images/cancel.png" alt="" />关 闭</span></a>       
    </div>
    </form>
</body>
</html>
